package cn.jcby.app.lebu.utils;


import cn.jcby.app.util.LocalResponseEntity;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import org.apache.commons.lang.StringUtils;

/**
 * @author:Administrator
 * @date:2021/9/10
 */
public class CheckResponseEntityUtils {

    public static void checkResponseEntity(LocalResponseEntity responseEntity, String nullMsg, String infoNullMsg){
        Assert.isFalse(responseEntity==null,nullMsg);
        Assert.isFalse(responseEntity.getCode()!=0,responseEntity.getMsg());
        Assert.isFalse(StringUtils.isNotBlank(infoNullMsg) && responseEntity.getData() == null, infoNullMsg);
    }

}
